Skip to content

Add 18 models by similarity by UILogicId#961

Merged
edenhaus merged 1 commit into
devfrom
models-by-uilogicid
May 11, 2025
Merged

Add 18 models by similarity by UILogicId#961
edenhaus merged 1 commit into
devfrom
models-by-uilogicid

Conversation

@edenhaus

@edenhaus edenhaus commented May 11, 2025

Copy link
Copy Markdown
Member

Fixes #700 fixes #814

Copilot AI review requested due to automatic review settings May 11, 2025 16:14
@edenhaus edenhaus added the pr: new-feature PR, which adds a new feature label May 11, 2025

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds functionality to link hardware models based on similarity both by their name and UILogicId. Key changes include refactoring file saving into a reusable function, introducing a new helper function to add symlinks for similar models, and adding several new hardware model files in the designated directory.

Reviewed Changes

Copilot reviewed 20 out of 20 changed files in this pull request and generated 1 comment.

File Description
scripts/check_for_similar_models.py Refactored saving functionality, added _add_models_by_similarity, and now generates both models_map.json and ui_logic_map.json.
deebot_client/hardware/deebot/*.py (multiple files) Added new hardware model files containing model identifiers.
Comments suppressed due to low confidence (5)

scripts/check_for_similar_models.py:83

  • The variable name 'map' shadows the built-in function. Consider renaming it to 'mapping' or 'model_map' for clarity.
for map in (name_map, ui_logic_map):

deebot_client/hardware/deebot/m17zko.py:1

  • [nitpick] Duplicate hardware model identifier 'yinacl.py' appears (also in p1wg05.py). Verify if this duplication is intentional or if each model should be unique.
yinacl.py

deebot_client/hardware/deebot/8o3xke.py:1

  • [nitpick] The identifier 'xco2fc.py' appears in multiple files (e.g., k1lgm7.py and 8o3xke.py). Confirm that duplicate identifiers are expected in the hardware models.
xco2fc.py

deebot_client/hardware/deebot/7c26ui.py:1

  • [nitpick] Duplicate hardware model identifier 'c8rj4y.py' detected (also in bheggm.py). Please verify if this repetition aligns with design expectations.
c8rj4y.py

deebot_client/hardware/deebot/6cibhb.py:1

  • [nitpick] The hardware model identifier '2px96q.py' is duplicated (also in qhq6i0.py). Ensure that this duplication is intentional.
2px96q.py

Comment on lines +44 to +48
os.symlink(
f"{model_to_link}.py",
f"{model}.py",
dir_fd=os.open("deebot_client/hardware/deebot", os.O_RDONLY),
)

Copilot AI May 11, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider handling potential exceptions (e.g., FileExistsError) when creating a symlink to avoid runtime errors if the link already exists.

Suggested change
os.symlink(
f"{model_to_link}.py",
f"{model}.py",
dir_fd=os.open("deebot_client/hardware/deebot", os.O_RDONLY),
)
try:
os.symlink(
f"{model_to_link}.py",
f"{model}.py",
dir_fd=os.open("deebot_client/hardware/deebot", os.O_RDONLY),
)
except FileExistsError:
logging.warning(f"Symbolic link for {model} already exists. Skipping.")

Copilot uses AI. Check for mistakes.
@codecov

codecov Bot commented May 11, 2025

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.60%. Comparing base (023ae93) to head (d04e942).
Report is 1 commits behind head on dev.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev     #961   +/-   ##
=======================================
  Coverage   93.60%   93.60%           
=======================================
  Files         128      128           
  Lines        4975     4975           
  Branches      324      324           
=======================================
  Hits         4657     4657           
  Misses        258      258           
  Partials       60       60           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@codspeed-hq

codspeed-hq Bot commented May 11, 2025

Copy link
Copy Markdown

CodSpeed Performance Report

Merging #961 will not alter performance

Comparing models-by-uilogicid (d04e942) with dev (023ae93)

Summary

✅ 6 untouched benchmarks

@edenhaus edenhaus merged commit a2d906c into dev May 11, 2025
27 checks passed
@edenhaus edenhaus deleted the models-by-uilogicid branch May 11, 2025 16:28
@edenhaus edenhaus changed the title Add models by similarity by UILogicId Add 18 models by similarity by UILogicId May 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr: new-feature PR, which adds a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for DEEBOT T30S AI Add support for Ozmo T5

2 participants